package client.kafka;

import java.io.Closeable;
import java.util.Collection;
import java.util.List;

import org.apache.kafka.clients.admin.ConsumerGroupDescription;
import org.apache.kafka.clients.admin.ConsumerGroupListing;
import org.apache.kafka.clients.admin.DescribeClusterResult;
import org.apache.kafka.clients.admin.NewTopic;
import org.apache.kafka.clients.admin.TopicDescription;
import org.apache.kafka.clients.admin.TopicListing;

/**
 * redis客户端实现接口
 * @author self
 *
 */
public interface IKafkaClient extends Closeable{

	/**
	 * 获取客户端名称
	 * @return　客户端名称
	 */
	String getName();

	/**
	 * 获取连接字符串
	 * @return
	 */
	String getConnStr();

	/**
	 * 初始化客户端连接和布局组件
	 */
	boolean init();

	/**
	 * 执行redis命令
	 * @param cmd　命令
	 * @return　命令结果
	 */
	String exeCmd(String cmd);

	void createTopics(List<NewTopic> topicList);

	void deleteTopics(List<String> topicList);

	Collection<TopicListing> listTopics();

	Collection<ConsumerGroupListing> listConsumerGroups();

	DescribeClusterResult describeCluster();

	TopicDescription describeTopics(String topic);

	ConsumerGroupDescription describeConsumerGroups(String groupId);
}
